package com.li.springbootproject.service.rabbitmq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.ReturnedMessage;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 8/17/2022 8:32 AM
 */
public class RabbitMqProduceReturnBack implements RabbitTemplate.ReturnsCallback{

    private static final Logger logger = LoggerFactory.getLogger(RabbitMqProduceReturnBack.class);

    @Override
    public void returnedMessage(ReturnedMessage returned) {
        logger.info("Confirmed RabbitMQ");
    }
}
